home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- global proc
- createHelpPanel (string $whichPanel)
- //
- // Description:
- // Define the editors that are used in this panel. No
- // controls (widgets) are created at this point.
- //
- {
- // create unique names for editors based on panel name
- //
- string $helpWidget = ($whichPanel + "HelpWidget");
-
- }
-
- global proc
- addHelpPanel (string $whichPanel)
- //
- // Description:
- // Add the panel to a layout.
- // Parent the editors to that layout and create any other
- // controls (widgets) required.
- //
- {
- string $helpWidget = ($whichPanel + "HelpWidget");
-
- // Make sure that there is no template active
- setUITemplate -pushTemplate NONE;
-
- // Define the standard panel
- //
- string $widgetList[];
-
- $widgetList[2] = `scriptedPanel -query -control $whichPanel`;
- $widgetList[0] = `formLayout`;
- $widgetList[3] = `frameLayout -visible true -borderVisible false
- -labelVisible false -collapsable false -collapse true
- -borderStyle "in"`;
- $widgetList[4] = `formLayout -visible true`;
- setParent $widgetList[0];
- $widgetList[5] = `formLayout -visible true`;
-
- formLayout -edit
- -attachForm $widgetList[3] top 0
- -attachForm $widgetList[3] right 0
- -attachForm $widgetList[3] left 0
-
- -attachControl $widgetList[5] top 0 $widgetList[3]
- -attachForm $widgetList[5] bottom 0
- -attachForm $widgetList[5] right 0
- -attachForm $widgetList[5] left 0
- $widgetList[0];
-
- setParent $widgetList[0];
-
- // menuBarLayout is turned on for this editor -
- // create the top level menus
- //
- setParent $widgetList[2];
-
- // Add support for the Context Sensitive Help Menu.
- //
- // addContextHelpProc $whichPanel "buildGraphEditorContextHelpItems";
-
- // Attach tools to the tool form
- //
- setParent $widgetList[4];
- toolButton
- -doubleClickCommand toolPropertyWindow
- -collection toolCluster
- -tool directKeySuperContext
- -style "iconOnly"
- -image1 "directKeySmall.xpm"
- -width 26 -height 26
- directKeyTool;
-
- // Layout the toolbar
- //
- formLayout -edit
- -attachForm directKeyTool "left" 0
-
- $widgetList[4];
-
- // Parent the editors to the editor layout
- //
- setParent $widgetList[5];
- htmlWidget $helpWidget;
- formLayout -edit
- -attachForm $helpWidget top 0
- -attachForm $helpWidget right 0
- -attachForm $helpWidget left 0
- -attachForm $helpWidget bottom 0
- $widgetList[5];
-
- // Attach menus to the graph editor and the
- // outliner editor.
- //
- // GraphEditorMenu $graphEd $outlineEd $widgetList;
-
- setParent -top;
-
- setUITemplate -popTemplate;
- }
-
- global proc
- removeHelpPanel (string $whichPanel)
- //
- // Description:
- // Remove the panel from a layout.
- // Delete controls.
- //
- {
- string $helpWidget = ($whichPanel + "HelpWidget");
-
- }
-
- global proc
- deleteHelpPanel (string $whichPanel)
- //
- // Description:
- // This proc will delete the contents of the panel, but not
- // the panel itself.
- //
- // Note:
- // We only need to delete editors here. Other UI will be taken care of
- // by the remove proc.
- //
- {
- string $helpWidget = ($whichPanel + "HelpWidget");
-
- }
-
- global proc string
- saveStateHelpPanel (string $whichPanel)
- //
- // Description:
- // This proc returns a string that when executed will restore the
- // current state of the panel elements.
- //
- {
- string $helpWidget = ($whichPanel + "HelpWidget");
-
- return ("");
- }
-